package second;

public class MyClass {
	private int a = 0;
	private String str = "";
	private char s = '$';

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + a;
		result = prime * result + s;
		result = prime * result + ((str == null) ? 0 : str.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		MyClass other = (MyClass) obj;
		if (a != other.a)
			return false;
		if (s != other.s)
			return false;
		if (str == null) {
			if (other.str != null)
				return false;
		} else if (!str.equals(other.str))
			return false;
		return true;
	}

	public MyClass() {

	};

	public MyClass(int a, String str, char s) {
		this.a = a;
		this.str = str;
		this.s = s;
	}

	public int getA() {
		return a;
	}

	public void setA(int a) {
		this.a = a;
	}

	public String getStr() {
		return str;
	}

	public void setStr(String str) {
		this.str = str;
	}

	public char getS() {
		return s;
	}

	public void setS(char s) {
		this.s = s;
	}

	@Override
	public String toString() {
		return "MyClass [a=" + a + ", str=" + str + ", s=" + s + "]";
	}
}
